package com.md.service;

import com.md.entity.Book;
import com.md.mapper.BookMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service

public class BookServices implements BookService {
    @Autowired
    private BookMapper mapper;


    @Override
    public List<Book> selectAll() {
        return mapper.selectAll();
    }

    @Override
    public List<Book> selectByName(String name) {
        return mapper.selectByName(name);
    }

    @Override
    public Book selectById(int id) {
        return mapper.selectById(id);
    }

    @Override
    public int deleteById(int id) {
        return mapper.deleteById(id);
    }

    @Override
    public int insertStudent(Book book) {
        return mapper.insertStudent(book);
    }

    @Override
    public int updateStudent(Book book) {
        return mapper.updateStudent(book);
    }
}
